package com.yanqu.road.server.manger.union.listener;

import com.yanqu.road.entity.union.cross.CrossUnionInfo;
import com.yanqu.road.entity.union.cross.CrossUnionMember;
import com.yanqu.road.server.GameServer;
import com.yanqu.road.server.manger.ICrossUnionSyncListener;
import com.yanqu.road.server.manger.activity.douluodalu.DouLuoDaLuMgr;

import java.util.List;

public class DouLuoDaLuListener implements ICrossUnionSyncListener {


    @Override
    public void notifySync(int syncType, long playerId, CrossUnionInfo unionInfo, List<CrossUnionMember> memberList) {

        for (CrossUnionMember member : memberList) {
            if(member.getServerId() == GameServer.getInstance().getServerId()){
                DouLuoDaLuMgr.unionChange(member.getUserId());
            }
        }

    }
}
